package com.jy.wms.web;

import com.jy.wms.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/*
* 库存转移管理
* 路由页面
* */
@Controller
@RequestMapping("/kczy")
public class WmsKczyRouter {
    @Autowired
    SysMenuService menuService;
    //主页面
    @RequestMapping(value = "/toKczy/{menu}")
    public String toKczy(@PathVariable String menu, Model model) {
        model.addAttribute("functions",menuService.getFunctions(menu));
        return "kczy/kczy";
    }
    //增加页面
    @RequestMapping(value = "/addKczy")
    public String addKq() {
        return "kczy/addKczy";
    }

    /*明细页面*/
    @RequestMapping(value = "/getFindInfo")
    public String getFindInfo(String id, Model model) {
        model.addAttribute("id",id);
        return "kczy/kczy_mx";
    }
    //初始状态跳转明细页面
    @RequestMapping(value = "/getMingXiInfo")
    public String getMingXiInfo(String id, Model model) {
        model.addAttribute("id",id);
        return "kczy/update_mx";
    }
    //跳转到新增明细页面
    @RequestMapping(value = "/addkczyMx")
    public String addkczyMx(String id, Model model) {
        model.addAttribute("id",id);
        return "kczy/add_mx";
    }
}
